#ifndef __PERSON_H__
#define __PERSON_H__

#include <iostream>
#include <string>
#include <deque>
#include <map>
#include <list>
#include <numeric>
using namespace std;


/* 选手类定义 */
class Person
{
public:
    int getPlayerNum(void) const;
    string getPlayerName(void) const;
    float getAverageScore(void) const;
    void setPlayerNum(int num);
    void setPlayerName(string name);
    void setAverageScore(float scr);    
public:
    /* 构造与析构函数 */
    Person(int num = 0, string name = "空", float scr = 0.0f)
        :mPlayerName(name), mPlayerNum(num), mAverageScore(scr){}
    Person(const Person &ob);
    ~Person(){}

private:
    int mPlayerNum;         /* 比赛号码 */
    string mPlayerName;     /* 选手名字 */
    float mAverageScore;    /* 选手成绩 */
};


void showPlayer(deque<Person *> &listPlayer);
void initPalyerName(deque<Person *> &listPlayer);
void shufflePlayer(deque<Person *> &listPlayer);
void setGroup(multimap<int, Person *> &mapPlayer, deque<Person *> &listPlayer, int n);
void showMapPlayer(multimap<int, Person *> &mapPlayer);
void traverseScore(list<int> &score);
void markPlayer(multimap<int, Person *> &mapPlayer);
void eraseList(deque<Person *> &listPlayer, Person *ptr);
void weedOut(multimap<int, Person *> &mapPlayer, deque<Person *> &listPlayer, int n);




#endif /* __PERSON_H__ */